User's own profile page, for use within a website
Access on /profile/
Supports REST access to return JSON data if you set a json content type
curl 'http://version1.airpoints.loopbackdns.com:8080/profile/' -H 'Host: version1.airpoints.loopbackdns.com:8080' -H 'Accept: application/json'
{
"data":{
"optins":{
},
"profile":{
"firstName":"dd",
"notes":"",
"surName":"dd",
"phone":"123123123",
"nickName":"admin",
"name":"admin",
"href":"/users/admin/public",
"userName":"admin",
"userId":2,
"email":"brad@xxxxx",
"photoHash":"61084ad4739a840d9983978a48c84ea6cd793251"
}
},
"fieldMessages":[
],
"messages":[
],
"nextHref":"",
"status":false
}
Properties
| Name | Returns | Notes | Example |
|---|---|---|---|
| profile | Profile | ||
| photoHref | String | ||
| firstName | String | ||
| surName | String | ||
| formattedName | String | ||
| notifyPreference | NotifyPreference | ||
| children | List | ||
| allMemberships | List | Return all memberships, to any type of group including optins | |
| mailingLists | Set | Return opt-in gruops which are of type "M" for mailing list, or where the group type is not set | |
| extraFields | Map | Iterate over all groups that this user is a member of and which are contained within this organisation. For each such group build a list of all the extra fields specified for that group If a user is a member of multiple groups which have fields of the same name, any required field will have preference over any non-required field. But there is no other ordering or preference. | |
| fields | Map | Get a map of extra field values in this profile, keyed on their field name. Note this pulls fields from all group memberships as for the extraFields property Example: If there is a field called 'referrer', use this to display its value for the current user #set($profile = $page.find("/profile")) referrer: $profile.fields.referrer | |
| preferredTags | List | ||
| thisProfile | Profile | ||
| userResource | UserResource |
Hide comments